package com.project.personal_blog.garbage_classification_management_system.service.Impl;

import com.project.personal_blog.garbage_classification_management_system.mapper.GarbageTypeMapper;
import com.project.personal_blog.garbage_classification_management_system.pojo.garbageType;
import com.project.personal_blog.garbage_classification_management_system.service.GarbageTypeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


import java.util.List;

@Service
public class GarbageTypeServiceImpl implements GarbageTypeService {
    @Autowired
    private GarbageTypeMapper garbageTypeMapper;

    @Override
    public List<garbageType> selectAll() {
        return garbageTypeMapper.selectAll();
    }

    @Override
    public garbageType selectById(int id) {
        return garbageTypeMapper.selectById(id);
    }

    @Override
    public boolean insert(garbageType garbageType) {
        return garbageTypeMapper.insert(garbageType);
    }

    @Override
    public boolean update(garbageType garbageType) {
        return garbageTypeMapper.update(garbageType);
    }

    @Override
    public boolean deleteById(int id) {
        return garbageTypeMapper.deleteById(id);
    }

    @Override
    public boolean PageSelect(int page, int size) {
        return garbageTypeMapper.pageSelect(page, size);
    }

    @Override
    public boolean sortByIdSelect(int id) {
        return garbageTypeMapper.sortByIdSelect(id);
    }
}
